Constructing Call Graphs of Scala Programs

نویسندگان

  • Karim Ali
  • Marianna Rapoport
  • Ondrej Lhoták
  • Julian Dolby
  • Frank Tip
چکیده

As Scala gains popularity, there is growing interest in programming tools for it. Such tools often require call graphs. However, call graph construction algorithms in the literature do not handle Scala features, such as traits and abstract type members. Applying existing call graph construction algorithms to the JVM bytecodes generated by the Scala compiler produces very imprecise results due to type information being lost during compilation. We adapt existing call graph construction algorithms, Name-Based Resolution (RA) and Rapid Type Analysis (RTA), for Scala, and present a formalization based on Featherweight Scala. We evaluate our algorithms on a collection of Scala programs. Our results show that careful handling of complex Scala constructs greatly helps precision and that our most precise analysis generates call graphs with 1.1-3.7 times fewer nodes and 1.5-18.7 times fewer edges than a bytecode-based RTA analysis.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An Evaluation of Call Graph Construction Algorithms for Scala

As Scala gains popularity, there is growing interest in programming tools for it. Such tools often require call graphs. However, call graph construction algorithms in the literature do not handle Scala features, such as traits and abstract type members. Applying existing call graph construction algorithms to the JVM bytecodes generated by the Scala compiler produces very imprecise results due t...

متن کامل

Evaluating Call Graph Construction for JVM-hosted Language Implementations

An increasing number of programming languages compile to the Java Virtual Machine (JVM), and program analysis frameworks such as WALA and SOOT support a broad range of program analysis algorithms by analyzing bytecode. While this approach works well when applied to bytecode produced from Java code, its efficacy when applied to other bytecode has not been studied until now. We present qualitativ...

متن کامل

USENIX Association

This paper presents a new, inexpensive, mechanism for constructing a complete call graph for Java programs at runtime, and provides an example of using the mechanism for implementing a dynamic reachability-based interprocedural analysis (IPA), namely dynamic XTA. Reachability-based IPAs, such as points-to analysis and escape analysis, require a context-insensitive call graph of the analyzed pro...

متن کامل

Constructing vertex decomposable graphs

‎Recently‎, ‎some techniques such as adding whiskers and attaching graphs to vertices of a given graph‎, ‎have been proposed for constructing a new vertex decomposable graph‎. ‎In this paper‎, ‎we present a new method for constructing vertex decomposable graphs‎. ‎Then we use this construction to generalize the result due to Cook and Nagel‎.

متن کامل

Towards Dynamic Interprocedural Analysis in JVMs

This paper presents a new, inexpensive, mechanism for constructing a complete call graph for Java programs at runtime, and provides an example of using the mechanism for implementing a dynamic reachability-based interprocedural analysis (IPA), namely dynamic XTA. Reachability-based IPAs, such as points-to analysis and escape analysis, require a context-insensitive call graph of the analyzed pro...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2014